Anet#813
Conversation
📝 WalkthroughWalkthroughAdds a new Agent Network documentation section, including sidebar navigation and MDX pages for the landing overview, architecture, quickstart, providers, policies, limits, global limits, usage and logs, and Claude Code, Codex, and LiteLLM integration guides. ChangesAgent Network documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/components/NavigationDocs.jsxOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON src/pages/agent-network/global-limits.mdxOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON src/pages/agent-network/how-it-works.mdxOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/agent-network/how-it-works.mdx`:
- Around line 58-59: Replace the concrete endpoint example in how-it-works.mdx
with a placeholder hostname. Update the sentence in the public docs content to
use a generic value like https://<your-agent-endpoint>.netbird.ai instead of the
real hostname, keeping the rest of the explanation the same. Use the existing
documentation text in the page body as the location to edit and avoid any real
customer or internal identifiers.
In `@src/pages/agent-network/index.mdx`:
- Around line 62-64: The internal-resources diagram in the “Agentic Access to
Internal Resources and Local Models” section has misleading alt text; update the
img element’s alt attribute in the agent-network page so it accurately describes
the internal-resources policy diagram instead of “agent network llm policy.” Use
the existing image markup in that section and keep the description concise but
content-matched for accessibility.
In `@src/pages/agent-network/policies/index.mdx`:
- Around line 27-28: The allow condition in the policy overview omits
guardrails, so update the sentence in the policies page to reflect that a
request is allowed only when the caller’s groups connect to the resolved
provider, no applicable limit is exhausted, and guardrails do not deny it. Make
this change in the prose near the policy enforcement description so the success
condition matches the rest of the page.
- Around line 1-18: The MDX page uses Note without importing it locally, so
update the policies page to import Note from `@/components/mdx` before the first
use. Keep the existing description and content intact, and add the missing
component import alongside the other top-level MDX symbols in index.mdx so the
<Note> block resolves correctly.
In `@src/pages/agent-network/quickstart.mdx`:
- Line 14: The repository link in quickstart.mdx points to an invalid target and
should be updated. Fix the markdown link for the NetBird repository reference so
it points to the repo root or the correct tree path under netbirdio/netbird,
using the existing link text and adjusting the URL in the affected quickstart
content.
- Around line 126-133: Clarify that the quick test request in the quickstart is
Anthropic-specific rather than provider-agnostic. Update the surrounding copy in
quickstart.mdx near the curl example to explicitly mention that it only works
with Anthropic-style /v1/messages requests and the anthropic-version header, and
direct readers to use the appropriate OpenAI-compatible or gateway example
elsewhere if they are following those paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 174ced50-6fe4-438e-a92d-5bdc6e2d47ca
⛔ Files ignored due to path filters (34)
public/docs-static/img/agent-network/global-limits/agent-network-create-global-limit.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/global-limits/agent-network-global-limits-list.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/how-it-works/agent-network-diagram-internal-resources.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/how-it-works/agent-network-diagram-llm-apis.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-connect-anthropic.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-connect-litellm.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-connect-openai.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-create-policy-codex.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-create-policy-litellm.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-create-policy.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-litellm-access-logs.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-litellm-tag-management.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/integrations/agent-network-litellm-tag-usage.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/overview/agent-network-control-center-v2.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/overview/agent-network-control-center.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/overview/agent-network-llm-policy.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/policies/agent-network-access-log.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/policies/agent-network-create-policy.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/policies/agent-network-guardrails.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/policies/agent-network-policy-limits.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/providers/agent-network-create-provider.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/providers/agent-network-providers-list.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-add-policy.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-add-provider.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-agent-config.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-connect-device.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-empty-endpoint.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-endpoint.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/quickstart/agent-network-usage-and-logs.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/usage-and-logs/agent-network-access-log-filters.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/usage-and-logs/agent-network-access-logs.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/usage-and-logs/agent-network-log-collection.pngis excluded by!**/*.pngpublic/docs-static/img/agent-network/usage-and-logs/agent-network-usage-overview.pngis excluded by!**/*.png
📒 Files selected for processing (17)
src/components/NavigationDocs.jsxsrc/pages/agent-network/global-limits.mdxsrc/pages/agent-network/how-it-works.mdxsrc/pages/agent-network/index.mdxsrc/pages/agent-network/integrations/claude-code.mdxsrc/pages/agent-network/integrations/codex.mdxsrc/pages/agent-network/integrations/index.mdxsrc/pages/agent-network/integrations/litellm.mdxsrc/pages/agent-network/policies/guardrails.mdxsrc/pages/agent-network/policies/index.mdxsrc/pages/agent-network/policies/limits.mdxsrc/pages/agent-network/providers.mdxsrc/pages/agent-network/quickstart.mdxsrc/pages/agent-network/usage-and-logs/access-logs.mdxsrc/pages/agent-network/usage-and-logs/index.mdxsrc/pages/agent-network/usage-and-logs/log-collection.mdxsrc/pages/agent-network/usage-and-logs/usage-overview.mdx
| The endpoint hostname itself (for example `https://sailcloth.netbird.ai`) is generated | ||
| when you connect your first provider and is only reachable from inside your overlay. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Use a placeholder hostname instead of a concrete endpoint.
Please replace https://sailcloth.netbird.ai with a placeholder-style value (for example, https://<your-agent-endpoint>.netbird.ai) in public docs.
As per coding guidelines, “Never include real customer names, internal hostnames, IPs, or production credentials in MDX documentation or public/ files — use placeholders instead”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/how-it-works.mdx` around lines 58 - 59, Replace the
concrete endpoint example in how-it-works.mdx with a placeholder hostname.
Update the sentence in the public docs content to use a generic value like
https://<your-agent-endpoint>.netbird.ai instead of the real hostname, keeping
the rest of the explanation the same. Use the existing documentation text in the
page body as the location to edit and avoid any real customer or internal
identifiers.
Source: Coding guidelines
| <p> | ||
| <img src="/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.png" alt="agent network llm policy" className="imagewrapper" /> | ||
| </p> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Fix misleading alt text for the internal-resources diagram.
The image in the “Agentic Access to Internal Resources and Local Models” section still uses alt="agent network llm policy", which doesn’t match the content.
Suggested fix
- <img src="/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.png" alt="agent network llm policy" className="imagewrapper" />
+ <img src="/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.png" alt="agent network internal resources policy" className="imagewrapper" />📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p> | |
| <img src="/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.png" alt="agent network llm policy" className="imagewrapper" /> | |
| </p> | |
| <p> | |
| <img src="/docs-static/img/agent-network/overview/agent-network-internal-resources-policy.png" alt="agent network internal resources policy" className="imagewrapper" /> | |
| </p> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/index.mdx` around lines 62 - 64, The
internal-resources diagram in the “Agentic Access to Internal Resources and
Local Models” section has misleading alt text; update the img element’s alt
attribute in the agent-network page so it accurately describes the
internal-resources policy diagram instead of “agent network llm policy.” Use the
existing image markup in that section and keep the description concise but
content-matched for accessibility.
| export const description = | ||
| 'Policies connect users and agents to AI providers, with optional token and budget limits plus guardrails for LLM access.' | ||
|
|
||
| # Policies | ||
|
|
||
| Policies connect users and agents (source groups) to AI providers — controlling | ||
| which identities can reach which providers and models, with optional limits and | ||
| guardrails. | ||
|
|
||
| <p> | ||
| <img src="/docs-static/img/agent-network/policies/agent-network-create-policy.png" alt="agent network llm policy" className="imagewrapper" /> | ||
| </p> | ||
|
|
||
| <Note> | ||
| This page explains how to create and manage access to AI providers and gateways. If you are | ||
| looking for a guide on how to manage access to internal resources, see | ||
| [Access Control](/manage/access-control). | ||
| </Note> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Import Note before using it.
<Note> is referenced here without a local import, so the MDX page will fail unless some external wrapper injects the component. As per coding guidelines, import custom components from @/components/mdx as needed.
🔧 Suggested fix
+import { Note } from '`@/components/mdx`'
+
export const description =
'Policies connect users and agents to AI providers, with optional token and budget limits plus guardrails for LLM access.'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const description = | |
| 'Policies connect users and agents to AI providers, with optional token and budget limits plus guardrails for LLM access.' | |
| # Policies | |
| Policies connect users and agents (source groups) to AI providers — controlling | |
| which identities can reach which providers and models, with optional limits and | |
| guardrails. | |
| <p> | |
| <img src="/docs-static/img/agent-network/policies/agent-network-create-policy.png" alt="agent network llm policy" className="imagewrapper" /> | |
| </p> | |
| <Note> | |
| This page explains how to create and manage access to AI providers and gateways. If you are | |
| looking for a guide on how to manage access to internal resources, see | |
| [Access Control](/manage/access-control). | |
| </Note> | |
| import { Note } from '`@/components/mdx`' | |
| export const description = | |
| 'Policies connect users and agents to AI providers, with optional token and budget limits plus guardrails for LLM access.' | |
| # Policies | |
| Policies connect users and agents (source groups) to AI providers — controlling | |
| which identities can reach which providers and models, with optional limits and | |
| guardrails. | |
| <p> | |
| <img src="/docs-static/img/agent-network/policies/agent-network-create-policy.png" alt="agent network llm policy" className="imagewrapper" /> | |
| </p> | |
| <Note> | |
| This page explains how to create and manage access to AI providers and gateways. If you are | |
| looking for a guide on how to manage access to internal resources, see | |
| [Access Control](/manage/access-control). | |
| </Note> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/policies/index.mdx` around lines 1 - 18, The MDX page
uses Note without importing it locally, so update the policies page to import
Note from `@/components/mdx` before the first use. Keep the existing description
and content intact, and add the missing component import alongside the other
top-level MDX symbols in index.mdx so the <Note> block resolves correctly.
Source: Coding guidelines
| A request is allowed when a policy connects the caller's groups to the resolved | ||
| provider and no applicable limit is exhausted. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Mention guardrails in the allow/deny rule.
This sentence says limits are the only remaining gate, but the page also defines guardrails as part of policy enforcement and they can deny requests too. Include them in the success condition.
✏️ Suggested fix
A request is allowed when a policy connects the caller's groups to the resolved
-provider and no applicable limit is exhausted.
+provider, attached guardrails accept the request, and no applicable limit is
+exhausted.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| A request is allowed when a policy connects the caller's groups to the resolved | |
| provider and no applicable limit is exhausted. | |
| A request is allowed when a policy connects the caller's groups to the resolved | |
| provider, attached guardrails accept the request, and no applicable limit is | |
| exhausted. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/policies/index.mdx` around lines 27 - 28, The allow
condition in the policy overview omits guardrails, so update the sentence in the
policies page to reflect that a request is allowed only when the caller’s groups
connect to the resolved provider, no applicable limit is exhausted, and
guardrails do not deny it. Make this change in the prose near the policy
enforcement description so the success condition matches the rest of the page.
| <Note> | ||
| NetBird Agent Network is open source and self-hosted, so you can run it on your own servers. This guide sets up a minimal | ||
| NetBird deployment with the core Agent Network functionality. You can enable the full platform later. | ||
| The code lives in the [netbirdio/netbird](https://github.com/netbirdio/netbird/agent-network) repository. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the repository link target.
https://github.com/netbirdio/netbird/agent-network is not a permalink to the source tree, so this link is likely to 404 or land on the wrong page. Point it at the repo root or the /tree/main/agent-network path instead.
🔧 Suggested fix
- The code lives in the [netbirdio/netbird](https://github.com/netbirdio/netbird/agent-network) repository.
+ The code lives in the [netbirdio/netbird](https://github.com/netbirdio/netbird/tree/main/agent-network) repository.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| The code lives in the [netbirdio/netbird](https://github.com/netbirdio/netbird/agent-network) repository. | |
| The code lives in the [netbirdio/netbird](https://github.com/netbirdio/netbird/tree/main/agent-network) repository. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/quickstart.mdx` at line 14, The repository link in
quickstart.mdx points to an invalid target and should be updated. Fix the
markdown link for the NetBird repository reference so it points to the repo root
or the correct tree path under netbirdio/netbird, using the existing link text
and adjusting the URL in the affected quickstart content.
| Run it as usual, or send a quick test request, using a model your provider allows: | ||
|
|
||
| ```bash | ||
| curl https://<your-endpoint>/v1/messages \ | ||
| --header "Content-Type: application/json" \ | ||
| --header "anthropic-version: 2023-06-01" \ | ||
| --data '{"model":"claude-opus-4-8","max_tokens":1024,"messages":[{"role":"user","content":"What is NetBird?"}]}' | ||
| ``` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Call out that this example is Anthropic-only.
The quickstart reads as provider-agnostic, but this request uses /v1/messages plus anthropic-version, so it won't work for the OpenAI-compatible or gateway paths you just introduced.
🛠 Suggested fix
+This example is specific to Anthropic-compatible providers.
+
```bash
curl https://<your-endpoint>/v1/messages \
--header "Content-Type: application/json" \
--header "anthropic-version: 2023-06-01" \
--data '{"model":"claude-opus-4-8","max_tokens":1024,"messages":[{"role":"user","content":"What is NetBird?"}]}'</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
Run it as usual, or send a quick test request, using a model your provider allows:
This example is specific to Anthropic-compatible providers.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/agent-network/quickstart.mdx` around lines 126 - 133, Clarify that
the quick test request in the quickstart is Anthropic-specific rather than
provider-agnostic. Update the surrounding copy in quickstart.mdx near the curl
example to explicitly mention that it only works with Anthropic-style
/v1/messages requests and the anthropic-version header, and direct readers to
use the appropriate OpenAI-compatible or gateway example elsewhere if they are
following those paths.
Summary by CodeRabbit